<template>
	<view>
		<div class="hello">欢迎</div>
		<input class="uni-input" value="" focus placeholder="请输入用户名" />
		<input class="uni-input" value="" password type="text" focus placeholder="请输入密码" />
		<button class="login" @click="login">登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		mounted() {
			console.log(this.$store.state.count);
		},
		methods: {
			login() {
				http.post('/api/user/account/login', {
					"credential": "Robinson",
					"password": "12345678aA!"
				}).then(res => {
					console.log(res);
					res.token
				}).catch(err => {
					console.log(err);
				})
			}
		}
	}
</script>

<style>
	.hello {
		margin: 40rpx 20rpx;
		font-size: 60rpx;
	}

	.uni-input {
		margin: 40rpx 20rpx;
		padding: 20rpx;
		border-bottom: 1rpx solid darkred;
	}

	.login {
		width: auto;
		height: auto;
		margin: 0 20rpx;
		color: #fff;
		background-color: indianred;
	}
</style>